{{ if user:logged_in }}

<a href="{{url:site uri='users/logout'}}">{{helper:lang line='users:logout'}}</a>
<a>{{user:display_name}}</a>

{{if user:group != 'admin'}}
<div class="fl hasChild" style="width:24px;">{{theme:image file='_icon/setting.png' class="icon-menu"}}
<ul>
	{{if user:group != 'boss1'}}
    <li class="tl"><a href="{{url:site uri='emp_off'}}">{{helper:lang line='global:dayoff'}}</a></li>
	{{endif}}
	{{if user:group != 'employee'}}
	<li class="tl"><a href="{{url:site uri='emp_off/waiting'}}">{{helper:lang line='emp_off:list_off'}}</a></li>
	{{endif}}
	<li class="tl"><a href="{{url:site uri='users/edit'}}">{{helper:lang line='users:account'}}</a></li>
	<li class="tl"><a href="{{url:site uri='emp_profile/config'}}">{{helper:lang line='global:config'}}</a></li>
</ul>
<script type="text/javascript">
$('.icon-menu').click(function(){
    $list = $(this).siblings('ul').slideToggle(200);
});
</script>
</div>
{{endif}}
<!--mess don xin nghi-->
{{if user:group != 'employee' }}
<script type="text/javascript">
$.ajax({
	url:'{{url:site uri="emp_off/count_cease"}}',
	dataType:'json',
	success:function(data){
		if(data.total>0){
			$link = "{{url:site uri='emp_off/cease'}}";
			$title = data.title;
			$html = '<a href="'+$link+'" title="'+$title+'" class="num mss">'+data.total+'</a>';
			$('.account .hasChild').before('<div class="hasChild fl prl"><a title="'+$title+'" href="'+$link+'" class="icon mess"></a>'+$html+'</div>');
		}
	}
});
</script>
{{endif}}
<!--end: mess don xin nghi-->
{{else}}
<form id="login" method="post" action="{{url:site uri='users/login'}}">
<input type="text" name="username" placeholder="{{helper:lang line='users:username'}}" />
<input type="password" name="password" placeholder="{{helper:lang line='users:password'}}" />
<button>{{helper:lang line='users:sigin'}}</button>
</form>
{{ endif }}
